SECRETS of the CAVERN by: DON SNYDER 12391 S. 800 EAST DRAPER, UTAH 84020 Many years ago, during a late night session of ADVENTURE, it suddenly occurred to me that I didn't know how the game worked. Sure, I knew that nothing magic was going on, but that's no help when you've got a case of the curio- sities. After a great deal of thought, I decided that it just couldn't be a few thousand if-then statements. After several hours of groveling at the feet of the lab assistant, I left the computer room with a listing of the program-in-question. While pouring over the print-out, I was amazed that the program was almost all tables! One table held all of the movement information, a second held the vocabulary, and a third held the information for the hazzards. Years passed, and I found myself at the keyboard of my very own com- puter. No longer did I have to wait for an available terminal. And no longer did my program grind to a near halt, when someone with more priority went to full screen edit. I now had the full attention of my own SYSTEM! "Dad, how does this ADVENTURE game work?" Well.....that's one question I could answer. Armed with the memory of that night, several years ago, I started a program that would answer my sons question. After all, it would only take an hour or so. Six hours later, the game was up and running. Sure, it was only a bare-bones implementation, but it had the most important elements of a real text adventure. You could move around the "cave" and pick up or drop items. The room descriptions were very complete, and the listing fit on one sheet of paper. In the year since this program was written, I have given copies to many young (and some not-so-young) ADVENTURE players, and now it's your turn. REMARKS: ________ THIS PROGRAM RUNS ON IBM-PC BASIC 100-160 Prints the title screen _______ 201-209 Is the movement data table _______ and room description data. The move- ment table is read into an array called GO(R,N) where R is the cur- rent room number, and N is the noun number. Part of the table is repro- duced below. If you move WEST out of room 2, you'll end up in room 6. N S E W Up Dn Rm 1 4 0 5 3 0 2 Rm 2 0 7 0 6 0 1 Rm 3 8 0 1 0 7 0 300-350 Is the vocabulary of the _______ game. 300 is the verbs, 320 is the nouns, and 340 is the responses the machine gives to the nouns. 400-450 Is the JMP table (jump). _______ This table lets the machine under- stand your phrase. 500 Initializes the variables. The ___ first room is room #1, the coin is in room #6, the gold is in room #7, the axe is in room #8, and the map, room #9. 600-690 Prints the current situa- _______ tion, the room description, possible exits, items carried, and items that may be picked up. 700-770 Gets the players input, _______ then processes it. 800-920 Uses the processed input _______ to read the JMP(R,N) table. Then, the program jumps to the appropriate response.